﻿<UserControl x:Class="JustPlus.DefCheckBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="28" d:DesignWidth="70">
    <UserControl.Resources>
        <Storyboard x:Key="On2Off">
            <DoubleAnimation Storyboard.TargetName="grid_translate" Storyboard.TargetProperty="X" From="0" To="-35" Duration="0:0:0.5"/>
        </Storyboard>
        <Storyboard x:Key="Off2On">
            <DoubleAnimation Storyboard.TargetName="grid_translate" Storyboard.TargetProperty="X" From="0" To="35" Duration="0:0:0.5"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" Width="70">
        <Label Content="ON" Height="28" HorizontalAlignment="Left" Margin="0,0,0,0" Name="label1" VerticalAlignment="Top" Style="{StaticResource GradLabel}" Width="35" />
        <Label Content="OFF" Height="28" HorizontalAlignment="Left" Margin="35,0,0,0" Name="label2" VerticalAlignment="Top" Width="35" Style="{StaticResource GradLabel}" />
        <Label Height="28" HorizontalAlignment="Left" Margin="33,0,0,0" Name="label3" VerticalAlignment="Top" Width="35" Background="OldLace">
            <Label.RenderTransform>
                <TransformGroup>
                    <TranslateTransform x:Name="grid_translate"/>
                </TransformGroup>
                </Label.RenderTransform>
        </Label>
    </Grid>
</UserControl>
